/**
 * Created by Administrator on 2019/11/6.
 */
//导入vue-router
import VueRouter from 'vue-router';

//导入中间组件的几大路由
import HomeContainer from './components/tabbar/HomeContainer.vue';
import MemberContainer from './components/tabbar/MemberContainer.vue';
import ShoppingContainer from './components/tabbar/ShoppingContainer.vue';
import SearchContainer from './components/tabbar/SearchContainer.vue';
import NewsList from './components/news/NewsList.vue';
import NewsInfo from './components/news/NewsInfo.vue';
import photoList from './components/photo/photoList.vue';
import photoInfo from './components/photo/photoInfo.vue';
import goodsList from './components/goods/goodsList.vue';
import goodsInfo from './components/goods/goodsInfo.vue';
import goodsDesc from './components/goods/goodsDesc.vue';
import goodsComments from './components/goods/goodsComments.vue';
var router=new VueRouter({
    routes:[
        {path: '/', redirect: '/home' }, 
        {path:'/home',component:HomeContainer},
        {path:'/home/newslist',component:NewsList},
        {path:'/home/newsinfo/:id',component:NewsInfo},
        {path:'/home/photolist',component:photoList},
        {path:'/member',component:MemberContainer},
        {path:'/shoppingcar',component:ShoppingContainer},        
        {path:'/search',component:SearchContainer},
        {path:'/home/photoInfo/:id',component:photoInfo},
        {path:'/home/goodsList',component:goodsList},
        //name属性表示给这个路由添加一个名字，路由跳转也可以通过name属性进行跳转
        {path:'/home/goodsInfo/:id',component:goodsInfo,name:'goodsinfo'},
        {path:'/home/goodsDesc/:id',component:goodsDesc,name:'Desc'},
        {path:'/home/goodsComments/:id',component:goodsComments,name:'Comments'}
    ],
    linkActiveClass: 'mui-active'
});
//将router导出去
export default router;